// ---------------------------------------------------------------------------
//  File:color_support.h
//
//  Description: Contains the data types, constants, and forward declarations
//               used to set the color of the radius rings
//
//  Author: golden.colorado.5280@gmail.com
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
//  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
//  DEALINGS IN THE SOFTWARE.
// ---------------------------------------------------------------------------

#ifndef COLOR_SUPPORT_H_INCLUDED
#define COLOR_SUPPORT_H_INCLUDED

#include <iostream>
#include <sstream>
#include <string>
#include <iomanip>
#include <algorithm>


//RGB color model is an additive color model
// see: https://en.wikipedia.org/wiki/RGB_color_model
typedef struct {
    double r;       // percent red
    double g;       // percent green
    double b;       // percent blue
    double a;       // percent opacity 0=clear 1=opaque
} RGB;

//Hue, Saturation, and Value color model
// see: https://en.wikipedia.org/wiki/HSL_and_HSV
typedef struct {
    double h;       // Hue - represents color
    double s;       // Saturation - corresponds to "lightness"
    double v;       // Value - brightness of the color
} HSV;

//Forward declarations
RGB color_blend(const RGB*, const RGB*, double);
RGB kml_to_rgb(std::string);
std::string rgb_to_kml(RGB);
void set_rgb_opacity(RGB*, float);

#endif // COLOR_SUPPORT_H_INCLUDED
